package registration.adventurezone.thevine.com;

import android.widget.CheckBox;
import android.widget.TextView;

public class ChildViewHolder {
	private CheckBox checkBox;
	private TextView textView;
	private DBChild child;
	private boolean checked = false;
	
	public ChildViewHolder(){}
	
	public ChildViewHolder(DBChild child, TextView textView, CheckBox checkBox) {
		this.checkBox = checkBox;
		this.textView = textView;
		this.child = child;
	}
	public ChildViewHolder(DBChild child) {
		this.child = child;
	}
	
	public CheckBox getCheckBox() {
		return checkBox;
	}
	public void setCheckBox(CheckBox checkBox) {
		this.checkBox = checkBox;
	}
	public TextView getTextView() {
		return textView;
	}
	public void setTextView(TextView textView) {
		this.textView = textView;
	}
	public DBChild getDBChild() {
		return child;
	}
	

	public String getName() {
		return child.getChildFirst() + " " + child.getChildLast();
	}
	/*
	public void setName(String name) {
		this.name = name;
	}
	*/
	public int getId() {
		return child.getID();
	}
	/*
	public void setId(int id) {
		this.id = id;
	}
	*/
	public boolean isChecked() {
		return checked;
	}
	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	public String toString() {
		return getName();
	}
	public void toggleChecked() {
		checked = !checked;
	}
}